import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta: {
      tabbarshow: true,
    }
  },
  {
    path: '/menu',
    name: 'Menu',
    component: () => import(/* webpackChunkName: "about" */ '../views/Menu.vue'),
    meta: {
      tabbarshow: true,
    }
  },
  {
    path: '/mine',
    name: 'Mine',
    component: () => import('../views/Mine.vue'),
    meta: {
      tabbarshow: true,
    },
  },
  {
    path: '/cooklist',
    name: 'CookList',
    component: () => import('../views/CookList.vue'),
    meta: {
      tabbarshow: false,
    }
  },
  {
    path: '/cookdetail',
    name: 'CookDetail',
    component: () => import('../views/CookDetail.vue'),
    meta: {
      tabbarshow: false,
    }
  },
  {
    path: '/search',
    name: 'Search',
    component: () => import('../views/Search.vue'),
    meta: {
      tabbarshow: false,
    }
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
